{include_core file="lib/header.html" title="我的售后" center="center"}
{include_core file="lib/top_nav.html"}
<style>
  .service-image>div.image-chunk{
    width:69px;
    height:60px;
    overflow: hidden;
    position: relative;
    float:left;
    margin: 0px 5px 5px 0px;
    border:1px solid #d9d9d9;
  }
  .service-image>div.image-chunk img{
    width:100%;
    height: auto;
  }
  .service-image>div.image-chunk .close{
    display: none;
    position: absolute;
    top: 2px;
    right: 2px;
    background: url({$smarty.const.SITE_URL}/images/close3.png) no-repeat;
    width: 16px;
    height: 16px;
    z-index: 8;
    cursor: pointer;
    text-align: center;
  }
  .service-image>div.image-chunk:hover{
    border :1px solid #c50e1a;
  }
  .service-image>div.image-chunk:hover .close{
    display: block;
  }
  .service-image>div.image-chunk .progress{
    position: absolute;
    bottom: 0px;
    left:0px;
    width:0px;
    height:5px;
    background: #05A;
    z-index:8;
  }
  .image-input{
    width: 62px;
    height: 62px;
    position: absolute;
    z-index: 88px;
    filter:alpha(opacity=0);
    -moz-opacity:0;
    opacity:0;
  }
  .peninfo ul li.pen-curr>span{
    display: inline-block !important;
  }
</style>
<div class="container">
  <div class="inner">
    <div class="con-top clearfix">
      {include_core file="lib/sidebar.html" crumbs_1="center" crumbs_2="service"}

      <div class="sale">
        <div class="sale-title clearfix">
          <h4>申请售后服务</h4>
          <span class="js_openLink" data-href="{AnUrl('exchange')}" data-target="_blank">售后政策</span>
        </div>
        <div class="who-help">
          <div class="who-top">
            <h4>我们能为您提供什么帮助？</h4>
            <p>请选择服务，而后我们将通过在线聊天、电话、面对面方式帮</p>
            <p>您与我们的售后工作人员取得联系</p>
          </div>
          <div class="who-list">
            <ul class="clearfix js_sltService">
              <li data-type="1">
                <a href="javascript:void(0);">
                  <h3><em class="who-th"></em>退货</h3>
                </a>
              </li>
              {*
              <li data-type="2">
                <a href="javascript:void(0);">
                  <h3><em class="who-th2"></em>换货</h3>
                </a>
              </li>
              *}
              <li data-type="3">
                <a href="javascript:void(0);">
                  <h3><em class="who-th3"></em>维修</h3>
                </a>
              </li>
            </ul>
          </div>

          <div class="back js_serviceFormDiv hidden">
            <div class="back-box">
              <h4>请选择商品</h4>
              <p class="js_serviceInfo">收到商品7天内无理由退货</p>
              <div class="back-list js_orderGoodsList">
                <ul data-day="{$has_day}">
                  {foreach $order_detail as $k=>$v}
                  {if $v.is_gift == 0}
                  <li class="{if !$order_detail[$k+1]}back-bor{/if} clearfix" data-max_num="{$v.goods_num}" data-curr_num="1">
                    <label class="js_sltGoods"><span class="back-check" data-id="{$v.id}"><input type="checkbox"/></span></label>
                    <h5><img src="{_image($v.goods_cover, 'small')}"/></h5>
                    <div class="back-p">
                      <p class="back1">{$v.goods_title} <span style="padding-left:10px;color:#888;">{goods_helper::get_sku_property_value($v.sku_id)}</span></p>
                      <p class="back2">订单号：{order_helper::order_id_encode($order_info.id)}　　单价：{$v.goods_price}</p>
                    </div>
                    <div class="back-r js_goodsViewInfo">{if $v.goods_num <1}<a href="javascript:void(0);" class="disabled">不可使用售后服务</a>{else}<a href="javascript:void(0);" class="js_goodsInfo"></a>{/if}</div>
                    {if $v.goods_num >0}
                    <div class="back-num js_goodsViewNumber clearfix hidden" data-max_num="{$v.goods_num}"><a class="back-add js_subNum" href="javascript:;">-</a><input class="js_numberInp" type="text" value="1"/><a class="back-add js_addNum" href="javascript:;">+</a></div>
                    {/if}
                  </li>
                  {/if}
                  {/foreach}
                </ul>
              </div>
            </div>

            

            <form action="{AnUrl('service/save_service')}" method="post" id="serviceForm">
              <div class="back-box2 js_serviceRemarks" style="height:auto; overflow: hidden;">
                <h4>问题描述 <em class="red">*</em></h4>
                <textarea name="info[reason]"></textarea>
                <p class="tit">上传问题描述照片</p>
                <div class="service-image js_imageDiv" style="clear: both; width:100%; height:auto; overflow: hidden;padding:10px 0px; ">
                  <div class="js_imageInput" style="position: relative; height: 60px; width:60px; float:left ">
                    <div class="add" style="position: absolute"><a href="javascript:void(0);" class="add-btn"></a></div>
                    <input id="js_fileUpload" class="image-input" type="file" name="Filedata" multiple data-url="{AnUrl("core/handler/file_uploader/uploadify")}">
                  </div>
                </div>
              </div>
              
              <input type="hidden" name="img" class="js_serviceImg">
              <input type="hidden" name="info[order_id]" value="{$order_info.id}">
              <input type="hidden" class="js_addInfoReceiver" name="info[receiver]" value="{$order_info.receiver}">
              <input type="hidden" class="js_addInfoMobile" name="info[mobile]" value="{$order_info.mobile}">
              <input type="hidden" class="js_addInfoProvince" name="info[province]" value="{$order_info.province}">
              <input type="hidden" class="js_addInfoCity" name="info[city]" value="{$order_info.city}">
              <input type="hidden" class="js_addInfoDistrict" name="info[district]" value="{$order_info.district}">
              <input type="hidden" class="js_addInfoAddress" name="info[address]" value="{$order_info.address}">
              <input type="hidden" class="js_addInfoPostCode" name="info[post_code]" value="">
              <input type="hidden" class="js_relationIds" name="info[relation_ids]" value="">
              <input type="hidden" class="js_serverTypeInp" name="info[service_type]">
              <input type="hidden" class="js_serviceNumbers" name="info[relation_num]">

              <div class="back-box3">
                <h4>确认联系人</h4>
                <div class="back-k js_addressInfo" style="border:1px solid rgb(230,230,230)">
                  <p><span style="margin-right:10px" class="name">{$order_info.receiver}</span><span class="tel">{$order_info.mobile}</span></p>
                  <p class="address">{$order_info.province} {$order_info.city} {$order_info.district}</p>
                  <p class="address-detail">{$order_info.address}</p>
                  <div class="back-update js_modifyAddress"><a href="javascript:void(0);">修改</a></div>
                </div>
                <div class="peninfo js_addressForm hidden">
                  <ul class="js_addressList" style="height: auto;overflow: hidden;margin-bottom: 10px;">
                    {foreach $address_list as $k=>$v}
                    <li style="padding:8px;margin:0px;" data-address_id="{$v.id}" class="js_addressEdit {if $address_info.id == $v.id}pen-curr{/if}">
                      <em class="ico"></em>{$v.province} {$v.city} {$v.district} {$v.address} ({$v.receiver} 收) {$v.mobile}
                      <span data-type="child" data-address_id="{$v.id}">编辑</span>
                    </li>
                    {/foreach}
                    <li style="padding:8px;margin:0px;" data-address_id="new" class="js_addressAdd {if !$address_info.id}pen-curr{/if}"><em class="ico"></em>使用新地址</li>
                    <input type="hidden" class="js_sltAddressInp" value="{if $address_info.id}{$address_info.id}{else}new{/if}"/>
                  </ul>

                  <div class="add-info js_addressFormDiv {if $address_info.id}hidden{/if}">
                    <label class="infos"><span>收 货 人 ： </span><input type="text" value="{$order_info.receiver}" class="js_ADDReceiver"/></label>
                    <label class="" id="addressSlt"><span>收货地区：</span>
                      <div class="info-select">
                        <select id="prov"></select>
                      </div>
                      <div class="info-select">
                        <select id="city"></select>
                      </div>
                      <div class="info-select">
                        <select id="dist"></select>
                      </div>
                    </label>
                    <input type="hidden" id="pre_province" value="{$address_ids.prov_id}"/>
                    <input type="hidden" id="pre_city" value="{$address_ids.city_id}"/>
                    <input type="hidden" id="pre_district" value="{$address_ids.dist_id}"/>
                    <label class="infos2"><span>详细地址：</span><input type="text" value="{$order_info.address}" class="js_ADDAddress"/></label>
                    <label class="infos"><span>手　　机：</span><input type="text" value="{$order_info.mobile}" class="js_ADDMobile"/>　<span>或　固定电话：</span><input type="text" value="{$order_info.tel}" class="js_ADDTel"/></label>
                    <div class="skin skin-check js_ADDIsDefault"><span><em></em><input type="checkbox"/></span>设为默认地址</div>
                  </div>

                  <div class="save tb js_ADDSave"><a href="javascript:void(0);">保存</a></div>
                </div>

                <div class="back-ty"><label><span class="js_agreePolicy" data-checked="checked"><em class="ico"></em><input type="checkbox"/></span>我已阅读售后政策<a href="{AnUrl('exchange')}" target="_blank">《售后政策》</a></label></div>
              </div>
            </form>

            <div class="back-foot">
              <!-- <span>下一步：选择服务方式</span> -->
              <a href="javascript:void(0);" class="js_submitServiceBtn">提交</a>
            </div>
          </div>
          <!--back  end-->
        </div>
        <!--who-help  end-->
      </div>
      <!--sale申请售后服务  end-->
      
    <!--con-top  end-->
  </div>
  <!--inner  end-->
</div>
<!--container  end-->
<div class="pup-fc hidden"></div>
<div class="sale-ok js_serviceAlert hidden">
  <div class="ok-close clearfix">
    <span>申请售后</span>
    <a href="javascript:void(0);" class="js_serviceProgress js_openLink"><img src="{$smarty.const.SITE_URL}/images/close3.png"/></a>
  </div>
  <div class="ok-box">
    <a href="javascript:void(0);"><img src="{$smarty.const.SITE_URL}/images/icon-x1/prompt-icon2-x1.png" width="50" height="50"></a>
    <p>您已经成功提交售后申请，请等待客服与您联系</p>
  </div>
  <div class="ok-btn">
    <a class="ok-back js_openLink"  data-href="{AnUrl('order')}" href="javascript:void(0);">确定</a>
    <a class="ok-look js_serviceProgress js_openLink"  data-href="" href="javascript:void(0);">查看进度</a>
  </div>
</div>
<!--确认弹窗  end-->
{*
{load_js file="jquery.ui.widget.js"}
{load_js file="jquery.iframe-transport.js"}
{load_js file="jquery.fileupload.js"}
*}
{load_js file="uploadify/jquery.uploadify.min.js"}
{load_js file="address/AjaxAddress.js"}
{load_js file="app/address.js"}
{load_js file="app/service.js?time={time()}"}
{include_core file="lib/footer.html"}